<?php namespace Modules\Shop\Http\Controllers;


class CycleImageController extends Controller {
	
	public function getIndex()
	{

        header('Content-Type: application/xml; charset=' . EC_CHARSET);
        header('Cache-Control: no-cache, must-revalidate');
        header('Expires: Thu, 27 Mar 1975 07:38:00 GMT');
        header('Last-Modified: ' . date('r'));
        header('Pragma: no-cache');

        if (file_exists(ROOT_PATH . DATA_DIR . '/cycle_image.xml')) {
            echo file_get_contents(ROOT_PATH . DATA_DIR . '/cycle_image.xml');
        } else {
            echo '<?xml version="1.0" encoding="' . EC_CHARSET . '"?><bcaster><item item_url="images/200609/05.jpg" link="http://www.ecshop.com" /></bcaster>';
        }

		return view('shop::index');
	}
	
}